<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require_once PATH_SITE.'org/puremvc/php/interfaces/INotifier.php'; 
require_once PATH_SITE.'org/puremvc/php/patterns/observer/Notifier.php'; 
require_once PATH_SITE.'org/puremvc/php/patterns/facade/Facade.php';
/**
 * Description of SimpleParse
 *
 * @author yanr
 */
class SimpleParse extends Notifier implements INotifier
{
    //put your code here
    const TYPE = "SimpleParse";
    protected $typeName;
    //static protected $instance;
    /*
    static public function getInstance()
    {
        IF( is_null( self::$instance ) ) self::$instance = new self( self::TYPE );
        RETURN self::$instance;
    }
    */
    public function __construct( $typeName = NULL )
    {
        $this->facade = Facade::getInstance();
        $this->typeName = $typeName?$typeName:self::TYPE;
    }
    
    public function parseInfo( $info )
    {
         IF( !$this->isValid( $info ) )
             RETURN FALSE;
    }
    
    protected function isValid( $info )
    {
        IF( $this->typeName != $info['type'] )
            RETURN FALSE;
    }
}

?>
